Repository navigation
fix: retain companion sessions and bound large history loading - #1685
Shopalooza1 wants to merge 1 commit into
Conversation
Publish the independently reviewed OpenClaw reliability source snapshot. Source commit: c0c235b05c8c4fce2d81d430102c7039f7c59cfe Exact source tree: 2591b2a Includes bounded history projection, catalog recovery, resumable checkpoints, and local hang-capture diagnostics. Windows native UI and full required runtime suites remain blocked by Code Integrity; no freeze prevention or production acceptance is claimed. Original incremental source history and validation receipts remain preserved in the existing Book-to-Mini handoff. This API publication is a snapshot commit with identical source content, not a rewrite of that history.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesThis PR adds session retention, bounded history loading and navigation, durable checkpoint helpers, and local hang diagnostics. Example: A reconnect returns an empty session list without confirmed inventory metadata.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Partial Merge readiness⛔ Blocked before merge - 10 items remain This PR contains distinct reliability work still absent from main, but its history cutover and retained-state handling need correction before merge. Priority: P1 Decision needed
Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherCompanion receives session catalogs and conversation history over the Gateway WebSocket, reconstructs retained conversation state, and projects it into native WinUI chat. flowchart TD
A[Gateway WebSocket] --> B[Session catalog admission]
A --> C[History page admission]
B --> D[Sessions and Retry]
C --> E[History loader]
E --> F[Conversation state]
F --> G[Native history window]
Technical reviewBest possible solution: Land a focused, backward-compatible retention repair through the existing history owners, preserving received content and chronology while separating unsponsored checkpoint and diagnostic capabilities. Do we have a high-confidence way to reproduce the issue? The captured producer fixture and retained-history merge code establish concrete failing inputs without execution; the sustained native UI hang has not been reproduced on current main by this review. Is this the best way to solve the issue? Bounding acquisition and projection is useful, but the consumer must preserve supported Gateway responses and retained ordering; related dump evidence also requires distinguishing reconstruction work from native tail-scroll hangs. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bff8c0bc71a3. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 24, 2026, 5:39 PM ET / 21:39 UTC (Revision 2). |
|
This pull request has been automatically marked as stale due to inactivity. |
|
This pull request has been automatically marked as stale due to inactivity. |
PR cleanup reviewReviewed head: Thanks for preserving the detailed reliability work and documenting the proof gaps. Current main now has older-history paging and recovery from #2093 (improve(chat): align native conversation and tool activity with web), and #1732 (fix: prevent intermittent credential reads and false handshake timeouts) addresses the credential publication race. Those overlap parts of this draft, but the catalog-completeness retention and bounded reconstruction/windowing changes are not fully covered, so I would not close it as wholly superseded. At a79b8c4, the captured legacy history response is still rejected by the mandatory carrier, terminal omission can prune retained entries, and a partial tail refresh can place older messages last. Could this be narrowed onto current main using its existing history owners, with populated-history/order/compatibility regressions, while checkpoint storage and native diagnostics are decided separately? Full Windows suites and current-head native proof remain needed. Action in this cleanup pass: leaving this PR open. No branch changes or runtime-proof waiver. The findings above come from source, discussion and recorded-CI review; Windows validation was not rerun in this pass. |
What Problem This Solves
Sessions can disappear after an incomplete reconnect response, and large history reconstruction can stall the companion or discard already loaded entries.
User Impact
Adds bounded, cancellable history acquisition/projection, catalog retention and visible retry state, durable checkpoint helpers, and opt-in local hang diagnostics. Existing history and raw message identity are retained. Native freeze prevention is not yet proven.
Why This Change Was Made
History work is bounded across fetch, reconstruction and display. Catalog replacement requires a qualified response. Checkpoint persistence and hang collection have explicit failure and lifetime handling.
This is a consolidated snapshot of the existing independently reviewed four-workstream branch. Original incremental source HEAD:
c0c235b05c8c4fce2d81d430102c7039f7c59cfe. API publication HEAD:a79b8c4410b59faf9fedc123365da4236cb3d7e5. Both have the exact Git tree2591b2a34cd8dfb15457edd0cd36805ce7dc4182. Original history remains preserved in the owner handoff.Evidence
Mini independently verified all 86 published blobs and exact source-tree equality. Current-source focused portable Tray tests: 55 passed, 0 failed, exit 0. Includes real synthetic socket/client/loader history replay, all 4,200 entries, cancellation/supersession, retained-state failures and distinct display IDs sharing a raw ID.
TRX SHA-256:
F1EB3F17AF92726C2C3F8F6E736161DFD6E82A95B25B5C1DA522B8496FB37A3C.Change Type
Scope
Required proof pools
windows-winui-interactive: history/retry UI, responsiveness and native hang capture.windows-wsl-gateway-e2e: real reconnect/history protocol and consumer integration.windows-11-sac-on: generated diagnostics binaries and trusted-signature runtime validation.These remain requested proof requirements, not evidence of execution or permission to provision hosts, spend, or schedule jobs. Maintainer approval and an existing authorized host are required.
Validation
OpenClaw.Tray.Tests: 55 passed, 0 failed.0xc0e90002../build.ps1dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restoredotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restoredotnet test ./tests/OpenClaw.Connection.Tests/OpenClaw.Connection.Tests.csproj --no-restoreFresh projects must restore/build before --no-restore; zero-test success is not acceptance.
Real Behavior Proof
Security Impact
Compatibility and Migration
Existing installed companion and gateway remain unchanged. No deployment, activation, merge, source deletion or trust-policy changes are included. Protocol/page compatibility and native diagnostics require the proof above.
Review Conversations